
package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.Area;
import com.ruoyi.service.AreaServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** @date 2025-03-13
 */
@RestController("省市区")
@RequestMapping("/business/area")
public class AreaController extends BaseController
{
    @Autowired
    private AreaServiceImpl service;
    @RequestMapping( value = "/getAreaTree"  )
    public Object getAreaTree()
    {
        return service.getAreaTree();
    }

    @RequestMapping( value = "/doSave"  )
    public Object doSave(@RequestBody Area area)
    {
        service.doSave(area);
        return "";
    }

    @RequestMapping( value = "/deleteById"  )
    public Object deleteById(Long id)
    {
        service.deleteById(id);
        return "";
    }
}
